[DOWNLOADING] foo v0.0.1 (registry file://[..])
[COMPILING] foo v0.0.1 (registry file://[..])
[INSTALLING] {home}[..]bin[..]foo[..]
+warning: be sure to add `[..]` to your PATH to be able to run the installed binaries
",
home = cargo_home().display())));
assert_that(cargo_home(), has_installed_exe("foo"));
[DOWNLOADING] foo v0.0.2 (registry file://[..])
[COMPILING] foo v0.0.2 (registry file://[..])
[INSTALLING] {home}[..]bin[..]foo[..]
+warning: be sure to add `[..]` to your PATH to be able to run the installed binaries
",
home = cargo_home().display())));
assert_that(cargo_home(), has_installed_exe("foo"));
pkg("foo", "0.0.1");
assert_that(cargo_process("install").arg("bar"),
execs().with_status(101).with_stderr("\
+[UPDATING] registry [..]
[ERROR] could not find `bar` in `registry file://[..]`
"));
});
pkg("foo", "0.0.1");
assert_that(cargo_process("install").arg("foo").arg("--vers=0.2.0"),
execs().with_status(101).with_stderr("\
+[UPDATING] registry [..]
[ERROR] could not find `foo` in `registry file://[..]` with version `0.2.0`
"));
});
assert_that(cargo_process("install").arg("--git").arg(p.url().to_string()),
execs().with_status(101).with_stderr("\
+[UPDATING] git repository [..]
[ERROR] multiple packages with binaries found: bar, foo
"));
});
execs().with_status(0).with_stderr(&format!("\
[COMPILING] foo v0.2.0 ([..])
[REPLACING] {home}[..]bin[..]foo[..]
+warning: be sure to add `[..]` to your PATH to be able to run the installed binaries
",
home = cargo_home().display())));
[COMPILING] foo v0.2.0 ([..])
[INSTALLING] {home}[..]bin[..]foo-bin3[..]
[REPLACING] {home}[..]bin[..]foo-bin2[..]
+warning: be sure to add `[..]` to your PATH to be able to run the installed binaries
",
home = cargo_home().display())));
execs().with_status(0).with_stderr(&format!("\
[COMPILING] foo v0.2.0 ([..])
[REPLACING] {home}[..]bin[..]foo-bin2[..]
+warning: be sure to add `[..]` to your PATH to be able to run the installed binaries
",
home = cargo_home().display())));
assert_that(cargo_process("install").arg("--path").arg(p.root()),
execs().with_status(101).with_stderr("\
+[COMPILING] foo v0.1.0 [..]
error: main function not found
error: aborting due to previous error
[ERROR] failed to compile `foo v0.1.0 (file://[..])`, intermediate artifacts can be \
[UPDATING] git repository `[..]`
[COMPILING] foo v0.1.0 ([..])
[INSTALLING] {home}[..]bin[..]foo[..]
+warning: be sure to add `[..]` to your PATH to be able to run the installed binaries
",
home = cargo_home().display())));
assert_that(cargo_home(), has_installed_exe("foo"));
assert_that(cargo_process("install").arg("--path").arg(p.root()),
execs().with_status(0).with_stderr("\
[INSTALLING] [..]
-").with_stderr("\
warning: be sure to add `[..]` to your PATH to be able to run the installed binaries
"));